import request from "@/utils/request";

// 订单列表
export function getListOrder(data) {
  return request({
    url: "/order/listOrder",
    method: "post",
    data: data,
  });
}
// 订单提交,生成订单
export function createOrder(data) {
  return request({
    url: "/order/createOrder",
    method: "post",
    data: data,
  });
}
// 订单支付
export function payOrder(data) {
  return request({
    url: "/order/payOrder",
    method: "post",
    data: data,
  });
}
// 取消订单
export function cancelOrder(orderId) {
  return request({
    url: "/order/orders/cancel",
    method: "post",
    data: data,
  });
}
// 删除订单
export function deleteOrder(orderId) {
  return request({
    url: "/order/orders/" + orderId,
    method: "post",
    data: data,
  });
}
// 订单详情
export function infoOrdersWithPage(data) {
  return request({
    url: "/order/info",
    method: "post",
    data: data,
  });
}
// 收货
export function takeOrder(data) {
  return request({
    url: "/order/takeOrder",
    method: "post",
    data: data,
  });
}
// 删除订单
export function delOrder(data) {
  return request({
    url: "/order/delOrder",
    method: "post",
    data: data,
  });
}
